home *** CD-ROM | disk | FTP | other *** search
Wrap
tttt____bbbbiiiinnnndddd((((3333NNNN)))) tttt____bbbbiiiinnnndddd((((3333NNNN)))) NNNNAAAAMMMMEEEE _tttt______bbbb_iiii_nnnn_dddd - bind an address to a transport endpoint SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS _####_iiii_ffff_dddd_eeee_ffff ______XXXX_OOOO_PPPP_EEEE_NNNN______SSSS_OOOO_UUUU_RRRR_CCCC_EEEE _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_xxxx_tttt_iiii_...._hhhh_>>>> _####_eeee_llll_ssss_eeee _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_tttt_iiii_uuuu_ssss_eeee_rrrr_...._hhhh_>>>> _####_eeee_nnnn_dddd_iiii_ffff _iiii_nnnn_tttt _tttt______bbbb_iiii_nnnn_dddd _((((_ffff_dddd_,,,, _rrrr_eeee_qqqq_,,,, _rrrr_eeee_tttt_)))) _iiii_nnnn_tttt _ffff_dddd_;;;; _ssss_tttt_rrrr_uuuu_cccc_tttt _tttt______bbbb_iiii_nnnn_dddd _****_rrrr_eeee_qqqq_;;;; _ssss_tttt_rrrr_uuuu_cccc_tttt _tttt______bbbb_iiii_nnnn_dddd _****_rrrr_eeee_tttt_;;;; DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN This function associates a protocol address with the transport endpoint specified by _ffff_dddd and activates that transport endpoint. In connection mode, the transport provider may begin accepting or requesting connections on the transport endpoint. In connectionless mode, the transport user may send or receive data units through the transport endpoint. The _rrrr_eeee_qqqq and _rrrr_eeee_tttt arguments point to a _tttt______bbbb_iiii_nnnn_dddd structure containing the following members: _ssss_tttt_rrrr_uuuu_cccc_tttt _nnnn_eeee_tttt_bbbb_uuuu_ffff _aaaa_dddd_dddd_rrrr_;;;; _uuuu_nnnn_ssss_iiii_gggg_nnnn_eeee_dddd _qqqq_llll_eeee_nnnn_;;;; _nnnn_eeee_tttt_bbbb_uuuu_ffff is described in _iiii_nnnn_tttt_rrrr_oooo(3N). The _aaaa_dddd_dddd_rrrr field of the _tttt______bbbb_iiii_nnnn_dddd structure specifies a protocol address and the _qqqq_llll_eeee_nnnn field is used to indicate the maximum number of outstanding connect indications. _rrrr_eeee_qqqq is used to request that an address, represented by the _nnnn_eeee_tttt_bbbb_uuuu_ffff structure, be bound to the given transport endpoint. _llll_eeee_nnnn [see _nnnn_eeee_tttt_bbbb_uuuu_ffff in _iiii_nnnn_tttt_rrrr_oooo(3N); also for _bbbb_uuuu_ffff and _mmmm_aaaa_xxxx_llll_eeee_nnnn] specifies the number of bytes in the address and _bbbb_uuuu_ffff points to the address buffer. _mmmm_aaaa_xxxx_llll_eeee_nnnn has no meaning for the _rrrr_eeee_qqqq argument. On return, _rrrr_eeee_tttt contains the address that the transport provider actually bound to the transport endpoint; this may be different from the address specified by the user in _rrrr_eeee_qqqq. In _rrrr_eeee_tttt, the user specifies _mmmm_aaaa_xxxx_llll_eeee_nnnn, which is the maximum size of the address buffer, and _bbbb_uuuu_ffff, which points to the buffer where the address is to be placed. On return, _llll_eeee_nnnn specifies the number of bytes in the bound address and _bbbb_uuuu_ffff points to the bound address. If _mmmm_aaaa_xxxx_llll_eeee_nnnn is not large enough to hold the returned address, an error will result. If the requested address is not available, or if no address is specified in _rrrr_eeee_qqqq (the _llll_eeee_nnnn field of _aaaa_dddd_dddd_rrrr in _rrrr_eeee_qqqq is zero) the transport provider may assign an appropriate address to be bound, and will return that address in the _aaaa_dddd_dddd_rrrr field of _rrrr_eeee_tttt. The user can compare the addresses in _rrrr_eeee_qqqq and _rrrr_eeee_tttt to determine whether the transport provider bound the transport endpoint to a different address than that requested. PPPPaaaaggggeeee 1111 tttt____bbbbiiiinnnndddd((((3333NNNN)))) tttt____bbbbiiiinnnndddd((((3333NNNN)))) _rrrr_eeee_qqqq may be _NNNN_UUUU_LLLL_LLLL if the user does not wish to specify an address to be bound. Here, the value of _qqqq_llll_eeee_nnnn is assumed to be zero, and the transport provider must assign an address to the transport endpoint. Similarly, _rrrr_eeee_tttt may be _NNNN_UUUU_LLLL_LLLL if the user does not care what address was bound by the provider and is not interested in the negotiated value of _qqqq_llll_eeee_nnnn. It is valid to set _rrrr_eeee_qqqq and _rrrr_eeee_tttt to _NNNN_UUUU_LLLL_LLLL for the same call, in which case the provider chooses the address to bind to the transport endpoint and does not return that information to the user. The _qqqq_llll_eeee_nnnn field has meaning only when initializing a connection-mode service. It specifies the number of outstanding connect indications the transport provider should support for the given transport endpoint. An outstanding connect indication is one that has been passed to the transport user by the transport provider. A value of _qqqq_llll_eeee_nnnn greater than zero is only meaningful when issued by a passive transport user that expects other users to call it. The value of _qqqq_llll_eeee_nnnn will be negotiated by the transport provider and may be changed if the transport provider cannot support the specified number of outstanding connect indications. On return, the _qqqq_llll_eeee_nnnn field in _rrrr_eeee_tttt will contain the negotiated value. This function allows more than one transport endpoint to be bound to the same protocol address (however, the transport provider must support this capability also), but it is not allowable to bind more than one protocol address to the same transport endpoint. If a user binds more than one transport endpoint to the same protocol address, only one endpoint can be used to listen for connect indications associated with that protocol address. In other words, only one _tttt______bbbb_iiii_nnnn_dddd for a given protocol address may specify a value of _qqqq_llll_eeee_nnnn greater than zero. In this way, the transport provider can identify which transport endpoint should be notified of an incoming connect indication. If a user attempts to bind a protocol address to a second transport endpoint with a value of _qqqq_llll_eeee_nnnn greater than zero, the transport provider will assign another address to be bound to that endpoint. If a user accepts a connection on the transport endpoint that is being used as the listening endpoint, the bound protocol address will be found to be busy for the duration of that connection. No other transport endpoints may be bound for listening while that initial listening endpoint is in the data transfer phase. This will prevent more than one transport endpoint bound to the same protocol address from accepting connect indications. This function resides within both the X/Open compliant _llll_iiii_bbbb_xxxx_nnnn_eeee_tttt and the SVR4 compliant _llll_iiii_bbbb_nnnn_ssss_llll Network Services libraries. Network Services applications which require X/Open compliance must link-load with _----_llll_xxxx_nnnn_eeee_tttt. Network Services applications which require SVR4 compliance must link- load with _----_llll_nnnn_ssss_llll. On failure, _tttt______eeee_rrrr_rrrr_nnnn_oooo may be set to one of the following: _[[[[_TTTT_BBBB_AAAA_DDDD_FFFF_]]]] The specified file descriptor does not refer to a transport endpoint. PPPPaaaaggggeeee 2222 tttt____bbbbiiiinnnndddd((((3333NNNN)))) tttt____bbbbiiiinnnndddd((((3333NNNN)))) _[[[[_TTTT_OOOO_UUUU_TTTT_SSSS_TTTT_AAAA_TTTT_EEEE_]]]] The function was issued in the wrong sequence. _[[[[_TTTT_BBBB_AAAA_DDDD_AAAA_DDDD_DDDD_RRRR_]]]] The specified protocol address was in an incorrect format or contained illegal information. _[[[[_TTTT_NNNN_OOOO_AAAA_DDDD_DDDD_RRRR_]]]] The transport provider could not allocate an address. _[[[[_TTTT_AAAA_CCCC_CCCC_EEEE_SSSS_]]]] The user does not have permission to use the specified address. _[[[[_TTTT_BBBB_UUUU_FFFF_OOOO_VVVV_FFFF_LLLL_WWWW_]]]] The number of bytes allowed for an incoming argument is not sufficient to store the value of that argument. The provider's state will change to _[[[[_TTTT______IIII_DDDD_LLLL_EEEE_]]]] and the information to be returned in _rrrr_eeee_tttt will be discarded. _TTTT_SSSS_YYYY_SSSS_EEEE_RRRR_RRRR A system error has occurred during execution of this function. SSSSEEEEEEEE AAAALLLLSSSSOOOO _iiii_nnnn_tttt_rrrr_oooo(3N), _tttt______aaaa_llll_llll_oooo_cccc(3N), _tttt______cccc_llll_oooo_ssss_eeee(3N), _tttt______oooo_pppp_eeee_nnnn(3N), _tttt______oooo_pppp_tttt_mmmm_gggg_mmmm_tttt(3N), _tttt______uuuu_nnnn_bbbb_iiii_nnnn_dddd(3N) DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS _tttt______bbbb_iiii_nnnn_dddd returns 0 on success and -1 on failure and _tttt______eeee_rrrr_rrrr_nnnn_oooo is set to indicate the error. PPPPaaaaggggeeee 3333